package com.student.demo.controller;

import com.student.demo.config.Result;
import com.student.demo.entity.User;
import com.student.demo.service.IUserService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;

@Slf4j
@RestController
@RequestMapping("/login")
public class UserController {
    @Resource
    private IUserService userService;

    @RequestMapping ("")
    public Result<?> login(HttpServletRequest request){
        return userService.login(request);
    }
}
